<template>
  <div>
    <div v-if="dialogVisible">
      <el-dialog title="信息确认并提交" :visible.sync="dialogVisible" width="700px">
      	<div>
      		<div v-for="(item, i) in systemGuifanFilesProcessList" :key="i">
      			<div class="mb10">
      			<b>管理信息<span v-if="systemGuifanFilesProcessList.length>1">({{index + 1}})</span></b>
      			</div>
      			<table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%">
      				<tr>
      					<td width="150">采购计划管理编号</td>
      					<td>{{ item.number }}</td>
      					<td width="150">采购类别</td>
      					<td>{{ purchaseList[item.purchaseType] }}</td>
      				</tr>
      				<tr>
      					<td>生产计划管理编号</td>
      					<td>{{ item.productionPlanNumber || '-' }}</td>
      					<td>管理部门</td>
      					<td>{{ item.manageDeptName }}</td>
      				</tr>
      				<tr>
      					<td>负责人</td>
      					<td>{{ item.manageUserName }}</td>
      					<td>编制部门</td>
      					<td>{{ item.createDeptName }}</td>
      				</tr>
      			</table>
      			<table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-if="item.purchaseType== 1">
      				<tr>
      					<td>设备名称</td>
      					<td class="gray_bg">设备型号</td>
      					<td>采购数量</td>
      				</tr>
      				<tr v-for="(v, i) in item.deviceList" :key="i">
      					<td class="white_bg">{{ v.deviceName }}</td>
      					<td class="white_bg">{{ v.deviceModel }}</td>
      					<td class="white_bg">{{ v.qty }}</td>
      				</tr>
      			</table>
      			<table class="table1 owntable mb20" border="0" cellspacing="0" cellpadding="1" width="100%" v-if="item.purchaseType==2">
      				<tr v-for="(v, i) in item.outsourcingList" :key="i">
      					<td>外包服务</td>
      					<td >{{ v.outsourcingName }}</td>
      				</tr>
      			</table>
      			<table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-if="item.purchaseType==3">
      				<tr>
      					<td>计算机应用软件名称</td>
      					<td class="gray_bg">计算机应用软件版本</td>
      					<td>数量</td>
      				</tr>
      				<tr v-for="(v, i) in item.softwareList" :key="i">
      					<td class="white_bg">{{ v.softwareName }}</td>
      					<td class="white_bg">{{ v.softwareVersion }}</td>
      					<td class="white_bg">{{ v.qty }}</td>
      				</tr>
      			</table>
      			<table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-if="item.purchaseType==0">
      				<tr>
      					<td>产品名称</td>
      					<td class="gray_bg">产品代码</td>
      					<td>规格型号</td>
      				</tr>
      				<tr v-for="(v, i) in item.productList" :key="i">
      					<td class="white_bg">{{ v.productName }}</td>
      					<td class="white_bg">{{ v.productCode }}</td>
      					<td class="white_bg">{{ v.productSku }}</td>
      				</tr>
      			</table>
      
      			<preview-file :detail="item"></preview-file>
      			</div>
      			<preview-process-record :guifanFilesProcessRecordList="guifanFilesProcessRecordList"></preview-process-record>
      
      		<div class="pub_center"><el-button size="small" type="primary" @click.once="close()">提交</el-button></div>
      	</div>
      </el-dialog>
    </div>
  </div>
	
</template>

<script>
export default {
	props: {
		type: String,
		guifanFilesProcessRecordList: [],
		systemGuifanFilesProcessList: []
	},
	data() {
		return {
			dialogVisible: false
		};
	},
	methods: {
		init() {
			this.dialogVisible = true;
		},
		close() {
			this.$emit('close');
		}
	}
};
</script>

<style scoped="scoped">
.table1 {
	margin-bottom: 20px;
}

table {
	width: 660px;
}
</style>
